package pi.server.storage.client;

public class Player{
	public boolean isConnected;
	public boolean isMyTurn;

	public int idOnServer;
	public String username;

	public UnitBase unit1;
	public UnitBase unit2;
	public UnitBase unit3;
	public UnitBase unit4;
	public UnitBase unit5;
	
	public Player(){
		isConnected = false;
		isMyTurn = false;

		idOnServer = 999;
		username = "";
		
		unit1 = new UnitBase();
		unit2 = new UnitBase();
		unit3 = new UnitBase();
		unit4 = new UnitBase();
		unit5 = new UnitBase();
	}
	
	public void Reset(){
		isConnected = false;
		isMyTurn = false;

		idOnServer = 999;
		username = "";
		
		unit1 = null;
		unit2 = null;
		unit3 = null;
		unit4 = null;
		unit5 = null;
	}

	public void ShowData(){
		System.out.println("Username: " + username);
		System.out.println("Id OnServer: " + idOnServer);
		System.out.println("Is Connected: " + isConnected);
		System.out.println("Is My Turn: " + isMyTurn);
		unit1.ShowData();
		unit2.ShowData();
		unit3.ShowData();
		unit4.ShowData();
		unit5.ShowData();
	}
	
	public String RegisterMyUnitOnMyEndTurn(UnitBase unit){
		String command = unit.x + "u" + unit.y + "u" + unit.life;
		return command;
	}

}